<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <ui:composition template="/resources/templates/default.xhtml">
        <ui:define name="title">Profil</ui:define>
        <ui:define name="titlePage">Compte administrateur</ui:define>
        <ui:define name="content">
            <p:panel header="Modification du profil">  
                <h:form> 
                <h:panelGrid id="panelProfil" columns="1" cellpadding="5" style=" margin: 0 auto;">  
                        <p:outputLabel value="Nom : ">
                            <p:inputText value="#{administrationBean.sessionBean.admin.nom}"/>
                        </p:outputLabel>
                        <p:outputLabel value="Prenom : ">
                            <p:inputText value="#{administrationBean.sessionBean.admin.prenom}"/>
                        </p:outputLabel>
                        <p:outputLabel value="Login : ">
                            <p:inputText value="#{administrationBean.sessionBean.admin.login}"/>
                        </p:outputLabel>
                        <p:commandButton value="Modifier" actionListener="#{administrationBean.modifierProfilAdmin()}" update="panelProfil :growl "/>
                        <br />
                        <p:outputLabel value="Changer le password :">
                            <p:password id="feedback" value="#{administrationBean.password}" feedback="true"/>
                        </p:outputLabel>
                        <p:outputLabel value="Confirmation du password : ">
                            <p:password value="#{administrationBean.confirmationPassword}"/>
                        </p:outputLabel> 
                        <p:commandButton value="Modifier le password" actionListener="#{administrationBean.modifierPassword()}" update="panelProfil :growl "/>
                    </h:panelGrid>
                </h:form>                
            </p:panel>  
        </ui:define>
    </ui:composition>
</html>
